Vue.component("symail", {
    data() {
        return {
            tabledata: {},
            sval: "",
            ext1: "",
            ext2: "",
            ext3: ""
        }
    },
    props: ["path", "col", "hidelist", "showitem", "pval", "vt"],
    template: `<div style="margin:20px;">
      <el-input v-model="sval" placeholder="UserID"></el-input><br/>
      <el-input v-model="ext1" placeholder="邮件标题"></el-input><br/>
      <el-input v-model="ext2" type="textarea" placeholder="邮件内容"></el-input>
      <el-input v-model="ext3" placeholder="邮件附件" style="width:400px"></el-input><br/>
      <el-button type="primary" plain @click="opendata(1)">发送</el-button>
      <pre>{{tabledata.view}}</pre>
    </div>`,
    methods: {
        opendata: function (pg) { //请求数据
            //console.log("opendata", this, this.path, this.datebe);
            let $this = this;
            $this.cpage = pg;
            if (this.tabledata.view) this.tabledata.view = "";
            http.get("/ajax/" + this.path + "?V=" + this.sval + "&E1=" + this.ext1 + "&E2=" + this.ext2 + "&E3=" + this.ext3).then(function (res) {
                $this.tabledata = res.data;
            });
        }
    }
});